import Vue from 'vue'
import axios from "axios";
Vue.prototype.$http = axios;
axios.interceptors.request.use(function (config) {
  // Do something before request is sent
  config.data = JSON.stringify(config.data);
  config.headers = {
    "Content-Type": "application/x-www-form-urlencoded"
  };
  config.params = {
    "access_token": "3vBtta1btsml3Q3ZRDJyv2atPWP2minl"
  };
  return config;
}, function (error) {
  // Do something with request error
  return Promise.reject(error);
});

// Add a response interceptor
axios.interceptors.response.use(function (response) {
  // Do something with response data
  //console.log(response)
  return response;
}, function (error) {
  // Do something with response error
  return Promise.reject(error);
});
